package com.kiln.juxingqs.view.viewkline;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import androidx.annotation.Nullable;

import com.kiln.juxingqs.R;
import com.kiln.juxingqs.api.bean.kline.MinuteLine;


/**
 *
 * Description k线横屏信息显示
 * Author puyantao
 * Email 1067899750@qq.com
 * Date 2018-10-26 17:42
 */


public class TopLeftHorizontalView extends LinearLayout {
    TextView tvContractName;//合约名
    TextView tvLastValue;
    TextView tvPrice;
    TextView tvPercentValue;
    TextView txtSell;
    TextView tvSellValue;//卖
    TextView tvSellCount;
    RelativeLayout rlSell;
    TextView txtBuy;
    TextView tvBuyValue;//买
    TextView tvBuyCount;
    RelativeLayout rlBuy;
    TextView txtInventory;
    TextView tvInventoryValue;//持仓量
    RelativeLayout rlInventory;
    TextView txtVolume;
    TextView tvVolumeValue;//成交量
    RelativeLayout rlVolume;
    TextView tvLMEValue;
    TextView tvProfitValue;
    TextView tvChangeInventoryValue;
    TextView tvChangeVolumeValue;

    private MinuteLine minuteLineEntity;

    public TopLeftHorizontalView(Context context) {
        super(context);
    }

    public TopLeftHorizontalView(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
        initView(context);
    }

    private void initView(Context context) {
        inflate(context, R.layout.view_top_left_horizontal, this);

        tvLastValue = findViewById(R.id.tvLastValue);
        tvPrice = findViewById(R.id.tvPrice);
        tvPercentValue = findViewById(R.id.tvPercentValue);
        txtSell = findViewById(R.id.txtSell);
        tvSellValue = findViewById(R.id.tvSellValue);
        tvSellCount = findViewById(R.id.tvSellCount);
        rlSell = findViewById(R.id.rlSell);
        txtBuy = findViewById(R.id.txtBuy);
        tvBuyValue = findViewById(R.id.tvBuyValue);
        tvBuyCount = findViewById(R.id.tvBuyCount);
        rlBuy = findViewById(R.id.rlBuy);
        txtInventory = findViewById(R.id.txtInventory);
        tvInventoryValue = findViewById(R.id.tvInventoryValue);
        rlInventory = findViewById(R.id.rlInventory);
        txtVolume = findViewById(R.id.txtVolume);
        tvVolumeValue = findViewById(R.id.tvVolumeValue);
        rlVolume = findViewById(R.id.rlVolume);
        tvLMEValue = findViewById(R.id.tvLMEValue);
        tvProfitValue = findViewById(R.id.tvProfitValue);
        tvChangeInventoryValue = findViewById(R.id.tvChangeInventoryValue);
        tvChangeVolumeValue = findViewById(R.id.tvChangeVolumeValue);
         tvContractName = findViewById(R.id.tvContractName);



    }

    public void fillData(MinuteLine minuteLineEntity) {
        this.minuteLineEntity = minuteLineEntity;
        if (minuteLineEntity == null) {
            return;
        }


    }
}
